<h3>团购产品管理</h3>
<%= will_paginate @tuangou_pros %>
<table>
  <tr>
    <th>团购标题</th>
    <th>团购产品</th>
    <th>团购状态</th>
     <th>团购价格</th>
    <th>点击数</th>
    <th>描述</th>
  </tr>

<% for tuangou_pro in @tuangou_pros %>
  <tr>
    <td><%=h tuangou_pro.title %></td>
    <td><%=h tuangou_pro.product.name %></td>
    <td><%=tuangou_pro.state==0 ? "进行中" : "团购完成" %></td>
    <td><%=number_to_currency(tuangou_pro.tprice,:unit=>"元",:format=>"%n %u") %></td>
    <td><%=h tuangou_pro.click_count %></td>
    <td><%=truncate(h(tuangou_pro.description),:length=>18) %></td>
    <td><%= link_to '报名列表',baomings_path(:tuangou_pro_id=>tuangou_pro.id) %></td>
    <td><%= link_to 'Edit', edit_tuangou_pro_path(tuangou_pro) %></td>
    <td><%= link_to 'Destroy', tuangou_pro, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<fieldset class="demo">
  <LEGEND>操作说明：</LEGEND>
  <p>
    用于管理团购产品！
  </p>
</fieldset>


